<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body></body>
  <script>
    const header = ['姓名', '手机号', '部门', '工号', '聘用形式', '入职日期', '转正日期']
    const obj = {
      correctionTime: '2018-11-30',
      departmentName: '总裁办',
      formOfEmployment: '1',
      mobile: '13800000002',
      timeOfEntry: '2018-11-02',
      username: '肖威',
      workNumber: '9002'
    }
    // ['肖威','总裁办','13800000002','9002','1','2018-11-30','2018-11-02']
    const headerRalation = {
      入职日期: 'timeOfEntry',
      姓名: 'username',
      工号: 'workNumber',
      手机号: 'mobile',
      转正日期: 'correctionTime',
      聘用形式: 'timeOfEntry',
      部门: 'departmentName'
    }
    const arr = []
    header.forEach(zhKey => {
      // 通过中文key找到英文key
      const enKey = headerRalation[zhKey]
      arr.push(obj[enKey])
    })
    console.log(arr)
  </script>
</html>
